
version="0.2.1"

################################
# Export the appropriate svn tag
################################
echo "Exporting SVN Tag"
svn export http://game-baker.googlecode.com/svn/trunk/tags/V$version game-baker-exported

#Run the documentation shell scripts
echo "Generating documentation"
./game-baker-exported/generate-doc.sh

#Removing the shell script
rm game-baker-exported/generate-doc.sh

################################
# Get the packaging database
# And copy the tagged version into
# the directory
################################
echo "Exporting packaging folder from SVN"
svn export http://game-baker.googlecode.com/svn/trunk/packaging packaging


echo "Copying tag to debian directory"
cp -r game-baker-exported/* packaging/debian/usr/share/game-baker/

read aok?"please check the Debian control version (especially for version number)"

nano packaging/debian/DEBIAN/control


################################
# Making .deb
################################
echo "making a .deb"
dpkg --build packaging/debian game-baker-$version_all.deb



################################
# make a .tar.gz and a .zip
################################
cp -r game-baker-exported game-baker-$version

echo "making .tar.gz for version $version"
tar czvf game-baker-$version.tar.gz game-baker-$version > tar_log.log

echo "making .zip for version $version"
zip -r game-baker-$version.zip game-baker-$version > zip_log.log

rm -r game-baker-$version





